package com.example.cslp.web;

/**
 * 业务状态码
 */
public final class ServiceCode {

    /**
     * 成功
     */
    public static final int OK = 20000;

    /**
     * 取消通话成功
     */
    public static final int OK_CANCEL = 20001;

    /**
     * 身份认证失败
     */
    public static final int FAILD=400100;
    /**
     * 错误：数据不存在
     */
    public static final int ERR_NOT_FOUND = 40400;
    /**
     * 错误：JWT数据错误，可能被恶意篡改
     */
    public static final int ERR_JWT_INVALID = 40001;
    /**
     * 错误：JWT过期
     */
    public static final int ERR_JWT_EXPIRED = 40300;

    /**
     * 错误：Token为空
     */
    public static final int ERR_TOKEN_NULL=40401;
    /**
     * 错误： Message为NULL
     */
    public static final int ERR_MESSAGE_NULL=40402;
    /**
     * 错误：ArticleDetails为空
     */
    public static final int ERR_ARTICLE_DETAILS_NULL=40403;

    /**
     * 错误：ArticleList为空
     */
    public static final int ERR_ARTICLE_LIST_NULL=40404;
    /**
     * 错误：通话记录为NULL
     */
    public static final int ERR_CALL_RECORD_NULL=40405;
    /**
     * 错误：用户列表为NULL
     */
    public static final int ERR_USER_LIST_NULL=40406;

    /**
     * 错误：caller为空
     */
    public static final int ERR_CALLER_NULL=40403;
    /**
     * 错误：缺少操作权限
     */
    public static final int ERR_FORBIDDEN=400301;
    /**
     * 错误：请求超时
     */
    public static final int ERR_REQUEST_TIMEOUT=40800;
    /**
     * 错误：冲突，通常是因为出现了重复的数据
     */
    public static final int ERR_CONFLICT = 40900;
    /**
     * 错误：插入数据失败
     */
    public static final int ERR_INSERT = 50000;
    /**
     * 错误：删除数据失败
     */
    public static final int ERR_DELETE = 50001;
    /**
     * 错误：更新数据失败
     */
    public static final int ERR_UPDATE = 50002;

    /**
     * 错误：查找数据失败
     */
    public static final int ERR_SELECT = 50003;
    /**
     * 错误：未处理的异常
     */
    public static final int ERR_UNKNOWN = 59999;

    /**
     * 错误：请求超时
     */
    public static final int REQUEST_TIMEOUT=408;
    /**
     * 成功：已取消通话
     */
    public static final int REQUEST_CANCEL=200;
}
